Repository navigation
fix: replace the usage of pseudo-element for hover and active styling on vanilla-extract components - #5227
Merged
Conversation
gndz07
force-pushed
the
fix/pseudo-hover
branch
from
November 26, 2026 13:34
3f0b257 to
48477ea
Compare
gndz07
marked this pull request as ready for review
November 26, 2026 14:04
mdeliatf
force-pushed
the
fix/pseudo-hover
branch
from
November 27, 2026 13:50
46ba917 to
009181e
Compare
|
🎉 This PR is included in version 13.16.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Vanilla components now draw hover, focus and pressed backgrounds as
background-imagelayers on the element itself, instead of on::beforeand::after. A custom background color set throughcssorclassNamekeeps the states on top. Overriding a state takes one rule on the element. Text is no longer tinted by an overlay. The primary tint is now aprimaryTinttheme token, applied with a smallstateLayershelper.Pseudo-elements stay where they draw part of the component rather than a state:
waitingstripesBreaking changes are documented in
BREAKING_CHANGES.mdunder "State Backgrounds: Layers Instead of Pseudo-Elements".ℹ️ not ready to merge, wait for
#5225and#5226to merge, and then adjust their styling to follow this pattern as well. Navigation elements on 5226 should have have this pattern already, but the function is limited to its own scope.